package com.wiscamp.ninechapters.problems.infrastructure.po.problems;

import com.wiscamp.ninechapters.ddd.PersistenceObject;
import com.wiscamp.ninechapters.problems.enums.Actions;
import jakarta.persistence.*;
import lombok.Data;

import java.io.Serial;

/**
 * 题干
 */
@Entity
@Data
@Table(name = "stems")
public class StemPO implements PersistenceObject {
    @Serial
    private static final long serialVersionUID = -832206152552917617L;

    /**
     * 题干编号
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(insertable = false, name = "stem_id", nullable = false)
    private long stemId = 0;

    /**
     * 题编号
     */
    @Column(name = "problem_id", nullable = false)
    private long problemId = 0;

    /**
     * 题干超文本内容
     */
    @Column(name = "stem_hypertext")
    private String stemHypertext = "";

    /**
     * 语料库类型
     */
    @Column(name = "corpus_type_id")
    private int corpusTypeId = 0;

    /**
     * 语料编号
     */
    @Column(name = "corpus_id")
    private long corpusId = 0;

    @Transient
    private Actions action = Actions.NONE;
}